﻿@inherits BaseComponent

<div class="kui-steps-form">
    <Steps Class="@Model.Class" Current="Model.Current">
        @foreach (var item in Model.Items)
        {
            <Step Title="@Language[item.Title]"
                  Subtitle="@Language[item.SubTitle]"
                  Description="@Language[item.Description]" />
        }
    </Steps>
    <div class="kui-steps-content">
        @if (Model.Items != null && Model.Items.Count > 0)
        {
            @Model.Items[Model.Current].Content
        }
    </div>
    <div class="kui-form-action">
        @if (Model.Current > 0)
        {
            <KButton Name="@Language.Previous" OnClick="OnPrevClickAsync" />
        }
        @if (Model.Current < StepCount - 1)
        {
            <KButton Name="@Language.Next" OnClick="OnNextClickAsync" />
        }
        @if (Model.Current == StepCount - 1 && !IsView)
        {
            <KButton Name="@Language.Finish" OnClick="OnCompleteAsync" />
        }
    </div>
</div>